Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow bypass cache on demand and error handling #8

Merged
merged 5 commits into from
Nov 21, 2023
Merged

Conversation

chandra-tacc
Copy link
Contributor

Overview

  • When session id is missing, recognize that and responding with error code to allow client to handle appropriately
  • When tapis token retrieval fails, send a different error code back to client to handle it.
  • For scenarios where cache could be corrupted, provide a mechanism to bypass cache for inbound requests.

Related

WP-370

Testing

  1. Tested with cache by pass
2023-11-17 21:46:04 +0000] [13] [DEBUG] 10.244.6.170 "GET http://a2cps-datastore-latest:8050/api/imaging?ignore_cache=True"
[2023-11-17 21:46:04 +0000] [13] [INFO] Received tapis token.
[2023-11-17 21:46:04 +0000] [13] [INFO] Ignoring cache for the request.
[2023-11-17 21:46:04 +0000] [13] [INFO] Sending request to https://a2cps.tapis.io/v3/files/content/secure.corral/corral-secure/projects/A2CPS/community/reports//imaging/imaging-log-latest.csv
[2023-11-17 21:46:05 +0000] [13] [INFO] Response status code: 200
[2023-11-17 21:46:05 +0000] [13] [INFO] Sending request to https://a2cps.tapis.io/v3/files/content/secure.corral/corral-secure/projects/A2CPS/community/reports//imaging/qc-log-latest.csv
[2023-11-17 21:46:05 +0000] [13] [INFO] Response status code: 200
[2023-11-17 21:46:05 +0000] [13] [INFO] Caching imaging report data. Date: 11/17/2023, 21:46:04
[2023-11-17 21:46:05 +0000] [13] [DEBUG] 10.244.6.170 "GET http://a2cps-datastore-latest:8050/api/imaging?ignore_cache=True" 200
  1. Tested with missing coresessionid (more test evidence in imaging report PR)
  2. Tested with expired coresessionid (more test evidence in imaging report PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant